<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>  
<c:set var="ctx" value="${pageContext.request.contextPath }" />
<link rel="stylesheet"
    href="${ctx }/resources/js/select2/select2.min.css" />
<script type="text/javascript"
    src="${ctx }/resources/js/select2/select2.min.js"></script>
<script type="text/javascript"
    src="${ctx }/resources/js/select2/zh-CN.js"></script>
    <script type="text/javascript">
$(function() {
    //console.log(webside.form.distinguish)
    //console.log(webside.form.dictionary)
    webside.form.distinguish.DistinguishForm();
    webside.form.distinguish.initResource();
})
</script>
<script src="${ctx }/resources/js/upload/ajaxfileupload.js"
    type="text/javascript"></script>
 


<style>
.iconShow
{
    padding-left: 10px; 
    padding-top: 3px;
}
.source-icon
{
     width:95%;
     float:left;
}
@media screen and (max-width: 374px){
    .source-icon
    {
         width:82%;
    }
}
@media screen and (min-width: 375px) and (max-width: 449px){
    .source-icon
    {
         width:85%;
    }
}
@media screen and (min-width: 450px) and (max-width: 1279px) {
    .source-icon
    {
         width:90%;
    }
}
@media screen and (min_width: 1280px) {
    .source-icon
    {
         width:90%;
    }
}
</style>
<div class="page-header">
    <h1>
        <c:if test="${empty distinguish}">
        新增视频分组
        </c:if>
        <c:if test="${!empty distinguish}">
        编辑视频分组
        </c:if>
    </h1>
</div>
<div class="row" style="margin-top: 5px;">
    <div class="col-xs-12">
        <form id="distinguishsForm" name="distinguishsForm" class="form-horizontal" role="form" method="post">
            <c:if test="${!empty distinguish}">
                <input type="hidden" id="pageNum" name="pageNum" value="${page.pageNum }"> 
                <input type="hidden" id="pageSize" name="pageSize" value="${page.pageSize }"> 
                <input type="hidden" id="orderByColumn" name="orderByColumn" value="${page.orderByColumn }"> 
                <input type="hidden" id="orderByType" name="orderByType" value="${page.orderByType }">
                <input type="hidden"  id='id' name="id" value="${distinguish.id }">
                 
            </c:if>
            
            <div class="form-group">
                <label class="control-label col-sm-1 no-padding-right" for="name">视频分组名称</label>
                <div class="col-sm-10">
	                <div class="clearfix">
	                    <input class="form-control" name="name" id="name" type="text"
	                        value="${distinguish.name }" placeholder="视频分组名称" />
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-1 no-padding-right" for="description">视频分组描述</label>
                <div class="col-sm-10">
	                <div class="clearfix">
	                   <input class="form-control" name="description"  id="description" 
	                       type="text" value="${distinguish.description }" placeholder="视频分组描述" />
	                </div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-1 no-padding-right" for="distinguishId">收录视频</label>
                <div class="col-sm-10">
                <div class="clearfix">
                    <input class="form-control" id="resourceName" name="AddSeries" type="text"
                            value="点击选择" placeholder="" />
                    <i id="SeriesResourceShow" data-rel="tooltip" data-placement="left"  data-original-title="点击清除" ></i>
                        <input id="distinguishId" name="distinguishId" value="${distinguish.id}" type="text" style="display:none;"/>
                </div>
                </div>
            </div>
            <%-- <div class="form-group">
                <label class="control-label col-sm-1 no-padding-right" for="sort">排序</label>
                <div class="col-sm-10">
                <div class="clearfix">
                    <input class="form-control" name="sort" id="sort" type="text"
                        value="${bdictionary.sort}" placeholder="排序"  onkeyup="value=value.replace(/[^(\d)]/g,'')"/>
                        <label>(只能输入0-9的数字)</label>
                </div>
                </div>
            </div>
             --%>
        </form>
        <div class="hr hr-dotted"></div>
    </div>
</div>
<div class="center">
    <button id="btnAdd" type="button" 
    onclick="javascript:$('#distinguishsForm').submit();" 
    class="btn btn-success btn-sm">
        <i class="fa fa-user-plus"></i>&nbsp;
        <c:if test="${empty distinguish}">
        添加
        </c:if>
        <c:if test="${!empty distinguish}">
        保存
        </c:if>
    </button>
    <button id="btn" type="button"
        onclick="webside.common.loadPage('/distinguish/listUI.html<c:if test="${!empty distinguish}">?page=${page.pageNum }&rows=${page.pageSize }&sidx=${page.orderByColumn }&sord=${page.orderByType }</c:if>')"
        class="btn btn-info btn-sm">
        <i class="fa fa-undo"></i>&nbsp;返回
    </button>
</div>
 